<!-- annotation loading -->
<template>
  <div>
    <button @click="excute">
      Loading submit
    </button>
    loading = {{ loading }}
  </div>
</template>

<script lang="ts">
import { Vue, Component } from "kaygnas-vue-property-decorator";
import { Loading, LoadingIntercept } from "@/annotations/loading";
import sleep from "@/methods/sleep";

@Component({
  name: "Demo1",
})
export default class Demo1 extends Vue {
  @Loading()
  public loading: boolean = false;

  @LoadingIntercept()
  public async excute() {
    await sleep(300);
  }
}
</script>

